package com.sz.mes.entity;

import java.util.Date;
import java.lang.Double;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.sz.mes.entity.BaseCustomEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.util.D;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 采购订单 Entity定义
 * @author hem
 * @version 1.0
 * @date 2023-09-05
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("purchase_order")
public class PurchaseOrder extends BaseCustomEntity {

    private static final long serialVersionUID = -7629877793833355121L;

    /**
     * 来源单据行号
     */
    @Length(max = 100, message = "来源单据行号长度应小于100")
    @TableField()
    private String sourceNumRow;

    /**
     * 行状态
     */
    @Length(max = 100, message = "行状态长度应小于100")
    @TableField()
    private String rowState;

    /**
     * 计划号
     */
    @Length(max = 255, message = "计划号长度应小于255")
    @TableField()
    private String planNum;

    /**
     * 料号
     */
    @Length(max = 100, message = "料号长度应小于100")
    @TableField()
    private String productNum;

    /**
     * 料品名称
     */
    @Length(max = 255, message = "料品名称长度应小于255")
    @TableField()
    private String productName;

    /**
     * 采购订单行.采购单位
     */
    @Length(max = 100, message = "采购订单行.采购单位长度应小于100")
    @TableField()
    private String unit;

    /**
     * 料品规格
     */
    @Length(max = 255, message = "料品规格长度应小于255")
    @TableField()
    private String specification;

    /**
     * 需求数量
     */
    @TableField()
    private Integer requireNum;

    /**
     * 单据编号
     */
    @Length(max = 100, message = "单据编号长度应小于100")
    @TableField()
    private String receiptNum;

    /**
     * 确认数量
     */
    @TableField()
    private Integer factNum;

    /**
     * 行号
     */
    @Length(max = 100, message = "行号长度应小于100")
    @TableField()
    private String rowNum;

    /**
     * 采购业务员
     */
    @Length(max = 100, message = "采购业务员长度应小于100")
    @TableField()
    private String purchasePerson;

    /**
     * 业务日期
     */
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @TableField()
    private Date businessDate;

    /**
     * 交期
     */
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @TableField()
    private Date deliveryDate;

    /**
     * 申请到货日期
     */
    @Length(max = 100, message = "申请到货日期长度应小于100")
    @TableField()
    private String arrivalDate;

    /**
     * 供应商简称
     */
    @Length(max = 100, message = "供应商简称长度应小于100")
    @TableField()
    private String supplierName;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * excel内容
     */
    @TableField()
    private String excelData;

    /**
     * 来源单据号
     */
    @Length(max = 100, message = "来源单据号长度应小于100")
    @TableField()
    private String sourceNum;
}
